package com.bank.backend.boot.server.converter;

import com.bank.backend.boot.base.model.dto.TradeDTO;
import com.bank.backend.boot.base.model.entity.Trade;
import com.bank.backend.boot.base.model.vo.TradeInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author jiaowei
 * @since 2025/3/30 16:03
 */
@Mapper(componentModel = "spring")
public interface TradeInfoConverter {
    TradeInfoConverter INSTANCE = Mappers.getMapper(TradeInfoConverter.class);

    Trade converter(TradeDTO tradeDTO);

    TradeInfoVO convertInfo(Trade trade);

    List<TradeInfoVO> convertInfo(List<Trade> tradeList);
}
